package com.qfedu.meidijiaju.controller;


import com.qfedu.meidijiaju.entity.ResponseData;
import com.qfedu.meidijiaju.entity.SheBeiKind;
import com.qfedu.meidijiaju.service.SheBeiKindService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "设备分类管理模块接口")
@RestController
public class SheBeiKindController {

        @Autowired
        private SheBeiKindService sheBeiKindService;

        @ApiOperation("查询设备分类")
        @RequestMapping(value = "/SheBeiKind/querySheBeiKind",method = RequestMethod.GET)
        public ResponseData<List<SheBeiKind>> queryTopic() {
            ResponseData<List<SheBeiKind>> responseData = new ResponseData<>();
            List<SheBeiKind> result = sheBeiKindService.querySheBeiKind();
            int count = sheBeiKindService.queryCount();
            if (result != null) {
                responseData.setCode(0);
                responseData.setData(result);
                responseData.setCount(count);
            }
            return responseData;
        }
    }


